<template>
  <div class="movie-box">
    <div class="movie-tit">
      <div class="movie-tbox">
        <div class="tbox-left" @click="gocity">
          <p class="t-pone">{{city}}</p>
          <van-icon name="arrow-down" color="#75777C" size="14px" />
        </div>
        <div class="tbox-centet-border">
          <div class="tbox-center">
            <router-link class="ptwo act" to="/movie/hot">正在热映</router-link>

            <router-link class="ptwo pthree" to="/movie/coming">即将上映</router-link>
          </div>
        </div>
        <van-icon name="search" color="#75777C" size="20px" />
      </div>
    </div>
    <router-view></router-view>
  </div>
</template>

<script>
// import play from "@/assets/images/movie/play.png";
import { mapState } from "vuex";
export default {
  data() {
    return {};
  },
  computed: {
    ...mapState({
      city: "cityPosition"
    })
  },
  created() {},
  mounted() {},
  methods: {
    gocity() {
      this.$router.push("/location");
    }
  }
};
</script>

<style scoped lang="scss" scoped>
// 头部样式
.movie-box {
  width: 100%;
  // height: 100vh;
  background: #22262d;
  overflow: hidden;
}

.movie-tit {
  width: 100%;
  height: 44px;
  background: rgba(51, 54, 61, 1);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.movie-tbox {
  width: 335px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .t-pone {
    display: inline-block;
    width: 25px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    font-weight: 400;
    color: rgba(223, 223, 223, 1);
    line-height: 12px;
    margin-right: 2px;
  }
}

body .tbox-center {
  width: 164px;
  height: 25px;
  // padding: 5px;
  border-radius: 7px;
  border: 1px solid;
  background-image: linear-gradient(
    314deg,
    rgba(241, 158, 101, 1),
    rgba(242, 105, 127, 1)
  );

  display: flex;
  align-items: center;
  // box-sizing: border-box;
}

body .active {
  background-image: linear-gradient(
    314deg,
    rgba(241, 158, 101, 1),
    rgba(242, 105, 127, 1)
  );

  color: rgba(245, 245, 245, 1);
  line-height: 14px;
}
a {
  width: 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.ptwo {
  width: 48.8%;
  height: 22px;
  margin: 0 auto;
  background-color: #33363d;
  border-radius: 5px 0 0 5px;
  font-weight: 500;
  color: rgba(150, 147, 147, 1);
  line-height: 14px;
}
.pthree {
  border-radius: 0 5px 5px 0;
}
.tbox-left {
  display: flex;
  align-items: center;
}

//内容区
</style>
